﻿using System.Collections.Generic;

namespace KataPotter.Logic
{
    public class CalculateDiscount
    {
        public List<double> GetDiscountForEachSeries(List<int> Series)
        {
            if (Series.Count == 0){return new List<double>();}
            var DiscountPrizeList = new List<double>();

            foreach (var Prize in Series)
            {
                switch (Prize/8)
                {
                    case 2:
                        DiscountPrizeList.Add(Prize * 0.95);
                        break;
                    case 3:
                        DiscountPrizeList.Add(Prize * 0.90);
                        break;
                    case 4:
                        DiscountPrizeList.Add(Prize * 0.80);
                        break;
                    case 5:
                        DiscountPrizeList.Add(Prize * 0.75);
                        break;
                }
            }

            return DiscountPrizeList;
        }
    }
}